#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2022, Christopher Durand
#
# This file is part of the modm project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# -----------------------------------------------------------------------------


def init(module):
    module.name = ":driver:mcp990x"
    module.description = """
Minimal driver for MCP9902/3/4 temperature sensor.
Only I2c is supported. SMBUS alert functions and power saving modes are not implemented.
"""

def prepare(module, options):
    module.depends(
        ":architecture:i2c.device",
        ":architecture:register")
    return True

def build(env):
    env.outbasepath = "modm/src/modm/driver/temperature"
    env.copy("mcp990x.hpp")
    env.copy("mcp990x_impl.hpp")
